import torch
import torch.nn as nn
import onnx
import numpy as np
import torch.nn.functional as F

class FcNet(nn.Module):
    def __init__(self):
        super(FcNet, self).__init__()
        self.fc1 = nn.Linear(4, 2, bias=False)

    def forward(self, x):
        x = x.view(1, 2 * 2)
        x = F.relu(self.fc1(x))
        return x


model = FcNet()
model.eval()
print(model)
input_names = ["input_0"]
output_names = ["output_0"]

in_tensor = torch.full([1, 1, 2, 2], 1.0)


res = model.forward(in_tensor)

#torch.onnx.export(model,(in_tensor,), 'fc.onnx', input_names=input_names, output_names=output_names,
#  dynamic_axes={'input_0':[0],'output_0':[0]} )
